<?xml version="1.0" encoding="UTF-8"?>

<!-- Copyright 2007 XBRL International. All Rights Reserved. -->

<link:linkbase
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:generic="http://xbrl.org/2008/generic"
  xmlns:formula="http://xbrl.org/2008/formula"
  xmlns:instance="http://xbrl.org/2008/formula/instance"
  xmlns:variable="http://xbrl.org/2008/variable"
  xmlns:cf="http://xbrl.org/2008/filter/concept"
  xmlns:df="http://xbrl.org/2008/filter/dimension"
  xmlns:pf="http://xbrl.org/2008/filter/period"
  xmlns:uf="http://xbrl.org/2008/filter/unit"
  xmlns:ca="http://xbrl.org/2008/assertion/consistency"
  xmlns:label="http://xbrl.org/2008/label"
  xmlns:xfi="http://www.xbrl.org/2008/function/instance" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:test="http://abc.com/test1"
  xmlns:i="http://abc.com/instance-resource-name"

  xsi:schemaLocation="
  http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd
  http://xbrl.org/2008/generic ../../core_schemas/generic-link.xsd
  http://xbrl.org/2008/formula ../../core_schemas/formula.xsd
  http://xbrl.org/2008/variable ../../core_schemas/variable.xsd
  http://xbrl.org/2008/assertion/consistency ../../core_schemas/consistency-assertion.xsd
  http://xbrl.org/2008/filter/concept ../../core_schemas/concept-filter.xsd
  http://xbrl.org/2008/filter/period ../../core_schemas/period-filter.xsd
  http://xbrl.org/2008/filter/unit ../../core_schemas/unit-filter.xsd
  http://xbrl.org/2008/filter/dimension ../../core_schemas/dimension-filter.xsd
  http://xbrl.org/2008/label ../../core_schemas/generic-label.xsd
  http://xbrl.org/2008/formula/instance formula-instance.xsd
  ">
  
  <link:arcroleRef arcroleURI="http://xbrl.org/arcrole/2008/element-label" xlink:href="../../core_schemas/generic-label.xsd#element-label" xlink:type="simple"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/arcrole/2008/variable-set" xlink:href="../../core_schemas/variable.xsd#variable-set" xlink:type="simple"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/arcrole/2008/variable-filter" xlink:href="../../core_schemas/variable.xsd#variable-filter" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.xbrl.org/2008/role/link" xlink:href="../../core_schemas/generic-link.xsd#standard-link-role" xlink:type="simple"/>

  <link:arcroleRef arcroleURI="http://xbrl.org/arcrole/2008/instance-variable" xlink:href="formula-instance.xsd#instance-variable" xlink:type="simple"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/arcrole/2008/formula-instance" xlink:href="formula-instance.xsd#formula-instance" xlink:type="simple"/>

  <generic:link xlink:type="extended"
    xlink:role="http://www.xbrl.org/2008/role/link">

    <!-- input xbrl instance b -->
    <instance:instance name="i:inst-b" xlink:type="resource" xlink:label="inst-b" />

    <!-- formula produces an output for each implicitly-matched
         item in both instances; no output if no implicit match in both instances -->
    <formula:formula xlink:type="resource" xlink:label="formula1" 
      value="$inst-a-item + $inst-b-item"
      source="inst-a-item"
      aspectModel="non-dimensional" implicitFiltering="true" >
      <formula:decimals>0</formula:decimals>
    </formula:formula>

    <!--  Fact variables.  Inst-a item from normal input xbrl instance-->
    <variable:factVariable xlink:type="resource" xlink:label="inst-a-item"   bindAsSequence="false" />

    <variable:variableArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" 
      name="inst-a-item" xlink:from="formula1" xlink:to="inst-a-item" order="1.0"/>

    <!--  Fact variables.  Inst-b item from input xbrl multi-instance b-->
    <variable:factVariable xlink:type="resource" xlink:label="inst-b-item"   bindAsSequence="false" />

    <generic:arc xlink:type="arc" 
      xlink:arcrole="http://xbrl.org/arcrole/2008/instance-variable" 
      xlink:from="inst-b" xlink:to="inst-b-item" order="1.0"/>

    <variable:variableArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" 
      name="inst-b-item" xlink:from="formula1" xlink:to="inst-b-item" order="1.0"/>

  </generic:link>

</link:linkbase>
